package day23;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class WriterPeom {
	public static void main(String[] args)throws Exception {
		FileInputStream fis = new FileInputStream("peom.txt");
		BufferedReader br = new BufferedReader(new InputStreamReader(fis, "UTF-8"));
		ArrayList<String> cs = new ArrayList<String>();
		String str = null;
		while((str=br.readLine())!=null){
			cs.add(str);
		}
		int row = cs.get(0).length();
		for(int i=0; i<row; i++){
			for(int j=cs.size()-1; j>=0; j--){
				System.out.print(cs.get(j).charAt(i));
			}
			System.out.println();
		}
		br.close();
	}
}
